<template>
<div>
      <h1>文章详情</h1>
  <p @click="idI()">获取id</p>
</div>
</template>

<script>
//可以获取id
export default {
    data(){
        return {

        }
    },
    created(){
 console.log(this.$route.params.id);
    },
    methods:{
        idI(){
            console.log(this.$route);
        }
    }
}
</script>

<style>

</style>